#!/bin/bash
. /usr/bin/mycommand/mycolor
PKGS=(
    "https://johnvansickle.com/ffmpeg/release-source/ffmpeg-4.1.tar.xz"
    "https://johnvansickle.com/ffmpeg/release-source/fontconfig-2.11.0.tar.xz"
    "https://johnvansickle.com/ffmpeg/release-source/freetype-2.6.1.tar.xz"
    "https://johnvansickle.com/ffmpeg/release-source/frei0r-plugins-1.4.tar.xz"
    "https://johnvansickle.com/ffmpeg/release-source/lame-3.99.5.tar.xz"
    "https://johnvansickle.com/ffmpeg/release-source/libass-git.tar.xz"
    "https://johnvansickle.com/ffmpeg/release-source/libsoxr-git.tar.xz"
    "https://johnvansickle.com/ffmpeg/release-source/libvidstab-git.tar.xz"
    "https://johnvansickle.com/ffmpeg/release-source/libvorbis-1.3.4.tar.xz"
    "https://johnvansickle.com/ffmpeg/release-source/libvpx-git.tar.xz"
    "https://johnvansickle.com/ffmpeg/release-source/libwebp-0.4.4.tar.xz"
    "https://johnvansickle.com/ffmpeg/release-source/libx264-git.tar.xz"
    "https://johnvansickle.com/ffmpeg/release-source/libx265-git.tar.xz"
    "https://johnvansickle.com/ffmpeg/release-source/opencore-amr-0.1.3.tar.xz"
    "https://johnvansickle.com/ffmpeg/release-source/opus-1.1.1.tar.xz"
    "https://johnvansickle.com/ffmpeg/release-source/speex-1.2rc2.tar.xz"
    "https://johnvansickle.com/ffmpeg/release-source/vo-aacenc-0.1.3.tar.xz"
    "https://johnvansickle.com/ffmpeg/release-source/vo-amrwbenc-0.1.3.tar.xz"
)

LEN=${#PKGS[@]}
idx=0
for var in ${PKGS[@]}
do
    idx=`expr $idx + 1`
   logwarn "[$idx@$LEN]下载包：${var##*/}"
   rm -rf ${var##*/}*
   wget $var
done
